package com.example.demo.pojo;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.NonNull;

import java.util.Date;

@Data
public class Announcement {
    private Integer announcementid; // AUTO_INCREMENT 主键
    @NotEmpty
    @Pattern(regexp = "^\\S{1,50}$")
    private String announcementtitle; // 公告标题
    @NotEmpty
    private String announcementcontent; // 公告内容
    private Date announcementpublishTime; // 公告发布时间
    private Integer userid; // 用户ID，外键
}
